package com.heima.model.behavior.dtos;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "点赞DTO")
public class LikesBehaviorDto implements Serializable {

    private static final long serialVersionUID = 1L;
    @NotBlank(message = "文章ID不能为空")
    @ApiModelProperty(value = "文章ID")
    private long articleId;

    @Min(value = 0, message = "0，1之间，0，点赞，1取消点赞")
    @Max(value = 1, message = "0，1之间，0，点赞，1取消点赞")
    @ApiModelProperty(value = "0：点赞，1：取消点赞")
    private short operation;

    @Min(value = 0, message = "0，2之间，0：文章，1：动态，2：评论")
    @Max(value = 2, message = "0，2之间，0：文章，1：动态，2：评论")
    @ApiModelProperty(value = "0：文章，1：动态，2：评论")
    private short type;
}
